package com.zhongkai.app.controller;

import com.zhongkai.app.service.BigDataUnitServcie;
import com.zhongkai.model.utils.ZhongkaiResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class MessListController {

    @Autowired
    private BigDataUnitServcie bigDataUnitServcie; //历史数据


    /**
     * 历史数据
     * @param uuid   //设备uuid
     * @param mess_time  内容 1 一小时  2 一天 3 一周
     * @param page
     * @param rows
     */
    @RequestMapping(value = "/user_app/formerly_date", produces = "application/json;charset=utf-8")
    @ResponseBody
    public ZhongkaiResult unitDate(String mess_time, String uuid, @RequestParam(defaultValue = "0") Integer page, @RequestParam(defaultValue = "0")Integer rows) {

        ZhongkaiResult result = bigDataUnitServcie.messList(mess_time,uuid,page,rows);

        return result;
    }
}
